package kr.hyunist.androidcomplete02saeildamil.ch20;

import kr.hyunist.androidcomplete02saeildamil.*;
import android.app.*;
import android.os.*;
import android.view.*;

public class DialogFragmentTest extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.dialogfragmenttest);
	}
	
	public void mOnClick(View v){
		FragmentManager fm = getFragmentManager();
		FragmentTransaction ft = fm.beginTransaction();
		Fragment prev = fm.findFragmentByTag("dialog");
		if(prev != null){
			ft.remove(prev);
		}
		NameGenderFragment dialog = new NameGenderFragment();
		dialog.show(fm, "dialog");
	}
}
